
<style>
body {
	background: #eeeeee;
}
</style>
<script>
function showUserAgent(e) {
	//e = e || window.event; //window.event for IE7/8

	var keyname = e.keyIdentifier || e.key; //chrome || IE
	
	//prevent F11 and F5 default event
	if (e.keyCode == 122 || e.keyCode == 116) { //F11 F5
		e.returnValue = false;
	}
	if (e.keyCode == 8) {
		alert(e.keyCode);
		window.history.go(-1);
	}
	
	var text = document.getElementById('ua');
	text.innerHTML = " " + navigator.userAgent;
}
</script>

<body onload="showUserAgent(event)">
	<div id="ua"></div>
</body>
